//
//  CommodityINfoTableViewCell.m
//  DA_V
//
//  Created by 中亿世联前台 on 15/4/21.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "CommodityINfoTableViewCell.h"
#import "AddAndSubtractView.h"
#import "UIViewAdditions.h"

@implementation CommodityINfoTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}




- (void)layoutSubviews{

    [super layoutSubviews];
    
    //测试－－－－－－数据
    self.price.text = @"483.0";
    self.discount.text = @"微商折扣：无";
    self.subtractBut.layer.borderWidth = 1.0f;
    self.subtractBut.layer.borderColor = [UIColor blackColor].CGColor;
    self.numLabel.layer.borderColor = [UIColor blackColor].CGColor;
    self.numLabel.layer.borderWidth = 1.0f;
    self.addBut.layer.borderWidth = 1.0f;
    self.addBut.layer.borderColor = [UIColor blackColor].CGColor;
    
    [self.but setTitle:@"成为微商 >" forState:UIControlStateNormal];
    self.but.backgroundColor = [UIColor greenColor];
    [super layoutSubviews];
}
#pragma -mark 减商品
- (IBAction)subtractClick:(id)sender {
    
    int i = self.numLabel.text.intValue;
    i=i-1;
    self.numLabel.text = [NSString stringWithFormat:@"%d",i];
}
#pragma -mark 加商品
- (IBAction)addNumClick:(id)sender {
    int i = self.numLabel.text.intValue;
    i=i+1;
    self.numLabel.text = [NSString stringWithFormat:@"%d",i];
}
#pragma -mark 成为微商点击事件
- (IBAction)becomeMerchant:(id)sender {
}

@end
